import request from "../utils/request";

/*
* 获取-图书列表的接口
* */

export const fetchBooksListAPI = () => request.get("/books")

/*
* 删除-图书的接口
* */
export const deleteBooksAPI = (id) => request.delete(`/books/${id}`)

/*
* 新增-图书的接口
* */
export const addBooksAPI = (book) => request.post('/books', book)

/*
* 获取-图书详情
* */
export const findBooksDetailAPI = (id) => request.get(`/books/${id}`)

/*
* 修改图书的接口
* */
export const editBooksAPI = ({data, id}) => request.put(`/books/${id}`, data)
